package com.zoweunion.mechanic.controller;

import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
import com.github.pagehelper.PageInfo;
import com.zoweunion.mechanic.entity.*;
import com.zoweunion.mechanic.model.ResponseBean;
import com.zoweunion.mechanic.model.User;
import com.zoweunion.mechanic.plugins.shiro.JWTUtil;
import com.zoweunion.mechanic.service.TSSsVehicleModelService;
import com.zoweunion.mechanic.service.base.UserService;
import com.zoweunion.mechanic.util.ExcelUtils;
import com.zoweunion.mechanic.util.MyException;
import com.zoweunion.mechanic.util.UuidUtil;
import com.zoweunion.mechanic.util.constants.Constants;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.FileOutputStream;
import java.net.URLEncoder;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


/**
 * 车类型号
 *
 * @author xp
 * @email 17688825585@163.com
 * @date 2020-05-25 20:08:39
 */
@RestController
@RequestMapping("/tsssvehiclemodel")
public class TSSsVehicleModelController extends BaseController {
    @Autowired
    private TSSsVehicleModelService tSSsVehicleModelService;
    @Autowired
    private UserService userService;

    /**
     * 列表
     */
    @GetMapping("/tSSsVehicleModelList")
    public ResponseBean tSSsVehicleModelList(@RequestParam Map<String, Object> params, HttpServletRequest request) throws MyException {
        params.put("s_id", getCurrentUser(request).getS_id());
        params.put("user_id", getCurrentUser(request).getId());
        PageInfo info = tSSsVehicleModelService.queryPage(params);

        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", info);
    }

    /**
     * 新增
     */
    @PostMapping("/tSSsVehicleModelInsertUpdate")
    public ResponseBean tSSsVehicleModelInsertUpdate(@RequestBody TSSsVehicleModelEntity params,
                                                     HttpServletRequest request) {
        if (params.getId() != null) {
            tSSsVehicleModelService.updateById(params);
        } else {
            params.setId(UuidUtil.get32UUID());
            params.setDeleteFlag(0);
            tSSsVehicleModelService.save(params);
        }
        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", "");
    }

    /**
     * 列表
     */
    @GetMapping("/tSSsVehicleModelListFor")
    public ResponseBean tSSsVehicleModelListFor(@RequestParam Map<String, Object> params, HttpServletRequest request) throws MyException {
        params.put("s_id", getCurrentUser(request).getS_id());
        params.put("user_id", getCurrentUser(request).getId());
        PageInfo<TSSsVehicleModelEntity> pageInfo = tSSsVehicleModelService.tSSsVehicleModelListFor(params);
        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", pageInfo);
    }

    /**
     * 上方列表
     */
    @GetMapping("/workSumHead")
    public ResponseBean workSumHead(@RequestParam Map<String, Object> params, HttpServletRequest request) throws MyException {
        params.put("s_id", getCurrentUser(request).getS_id());
        getServerSid(getCurrentUser(request).getS_id(), params);
        Map<String, Object> workSumHead = tSSsVehicleModelService.workSumHead(params);
        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", workSumHead);
    }

    /**
     * 型号数量比
     */
    @GetMapping("/modelPercent")
    public ResponseBean modelPercent(@RequestParam Map<String, Object> params, HttpServletRequest request) throws MyException {
        params.put("s_id", getCurrentUser(request).getS_id());
        getServerSid(getCurrentUser(request).getS_id(), params);
        List<Map<String, Object>> modelPercent = tSSsVehicleModelService.modelPercent(params);
        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", modelPercent);
    }

    /**
     * 故障排行
     */
    @GetMapping("/spnOrder")
    public ResponseBean spnOrder(@RequestParam Map<String, Object> params, HttpServletRequest request) throws MyException {
        params.put("s_id", getCurrentUser(request).getS_id());
        getServerSid(getCurrentUser(request).getS_id(), params);
        List<Map<String, Object>> modelPercent = tSSsVehicleModelService.spnOrder(params);
        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", modelPercent);
    }

    /**
     * 工时油耗统计
     */
    @GetMapping("/workFuel")
    public ResponseBean workFuel(@RequestParam Map<String, Object> params, HttpServletRequest request) throws MyException {

        //这边修改是因为app不登陆也需要看到使用车的车辆信息
        String authorization = request.getHeader("Authorization");
        //根据请头中是否带有Authorization信息
        if (authorization != null) {
            String user_account = JWTUtil.getUsername(authorization);
            User currentUser = userService.getUserByAccount(user_account);
            if (currentUser == null) {
                params.put("s_id", "");
            } else {
                params.put("s_id", getCurrentUser(request).getS_id());
            }
            getServerSid(getCurrentUser(request).getS_id(), params);
        } else {
            params.put("s_id", "");
            getServerSid("b2ee155eed7845809b24e84e54f35060", params);
        }
        Map<String, Object> modelPercent = tSSsVehicleModelService.workFuel(params);
        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", modelPercent);
    }


    /**
     * 按省分总工时
     */
    @GetMapping("/workByPro")
    public ResponseBean workByPro(@RequestParam Map<String, Object> params, HttpServletRequest request) throws MyException {
        params.put("s_id", getCurrentUser(request).getS_id());
        getServerSid(getCurrentUser(request).getS_id(), params);
        List<Map<String, Object>> modelPercent = tSSsVehicleModelService.workByPro(params);
        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", modelPercent);
    }

    /**
     * 机型列表
     */
    @GetMapping("/modelList")
    public ResponseBean modelList(@RequestParam Map<String, Object> params, HttpServletRequest request) throws MyException {
        params.put("s_id", getCurrentUser(request).getS_id());
        changeSid(params, request);
        List<Map<String, Object>> modelPercent = tSSsVehicleModelService.modelList(params);
        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", modelPercent);
    }

    /**
     * 设备在线率趋势
     *
     * @param params
     * @param request
     * @throws MyException
     */
    @GetMapping("/onlineCurrentList")
    public ResponseBean onlineCurrentList(@RequestParam Map<String, Object> params, HttpServletRequest request) throws MyException {
        params.put("s_id", getCurrentUser(request).getS_id());
        changeSid(params, request);
        getServerSid(getCurrentUser(request).getS_id(), params);
        List<Map<String, Object>> modelPercent = tSSsVehicleModelService.onlineCurrentList(params);
        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", modelPercent);
    }

    /**
     * 省开工率
     *
     * @param params
     * @param request
     * @throws MyException
     */
    @GetMapping("/provinceList")
    public ResponseBean provinceList(@RequestParam Map<String, Object> params, HttpServletRequest request) throws MyException {
        params.put("s_id", getCurrentUser(request).getS_id());
        changeSid(params, request);
        getServerSid(getCurrentUser(request).getS_id(), params);
        List<Map<String, Object>> modelPercent = tSSsVehicleModelService.provinceList(params);
        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", modelPercent);
    }

    /**
     * 故障代码新
     *
     * @param params
     * @param request
     * @throws MyException
     */
    @GetMapping("/faultListNew")
    public ResponseBean faultListNew(@RequestParam Map<String, Object> params, HttpServletRequest request) throws MyException {
        params.put("s_id", getCurrentUser(request).getS_id());
        changeSid(params, request);
        getServerSid(getCurrentUser(request).getS_id(), params);
        Map<String, Object> modelPercent = tSSsVehicleModelService.faultListNew(params);
        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", modelPercent);
    }


    /**
     * 怠速负荷总比
     *
     * @param params
     * @param request
     * @throws MyException
     */
    @GetMapping("/idlingPercent")
    public ResponseBean idlingPercent(@RequestParam Map<String, Object> params, HttpServletRequest request) throws MyException {
        params.put("s_id", getCurrentUser(request).getS_id());
        changeSid(params, request);//
        getServerSid(getCurrentUser(request).getS_id(), params);
        Map<String, Object> modelPercent = tSSsVehicleModelService.idlingPercent(params);
        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", modelPercent);
    }

    /**
     * 工时油耗统计
     *
     * @param params
     * @param request
     * @throws MyException
     */
    @GetMapping("/workingFuelNew")
    public ResponseBean workingFuelNew(@RequestParam Map<String, Object> params, HttpServletRequest request) throws MyException {
        params.put("s_id", getCurrentUser(request).getS_id());
        changeSid(params, request);
        getServerSid(getCurrentUser(request).getS_id(), params);
        List<Map<String, Object>> modelPercent = tSSsVehicleModelService.workingFuelNew(params);
        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", modelPercent);
    }

    //设备列表新
    @GetMapping("/mapCount")
    public ResponseBean mapCount(@RequestParam Map<String, Object> params, HttpServletRequest request) throws MyException {
        getServerSid(getCurrentUser(request).getS_id(), params);
        Map<String, Object> headCount = tSSsVehicleModelService.mapCount(params);
        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", headCount);
    }

    //设备列表新
    @GetMapping("/mapListNew")
    public ResponseBean mapListNew(@RequestParam Map<String, Object> params, HttpServletRequest request) throws MyException {
        User user = getCurrentUser(request);
        // 拦截器处理数据范围需要的参数-start
        params.put("s_id", user.getS_id());
        params.put("current_logined_user_id", user.getId());
        params.put("current_logined_user_r_id", user.getR_id());
        getServerSid(getCurrentUser(request).getS_id(), params);
        // 拦截器处理数据范围需要的参数-end
        Map<String, Object> headCount = tSSsVehicleModelService.mapListNew(params);
        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", headCount);
    }

    //设备列表详情
    @GetMapping("/mapInfoNew")
    public ResponseBean mapInfoNew(@RequestParam Map<String, Object> params, HttpServletRequest request) throws MyException {
        getServerSid(getCurrentUser(request).getS_id(), params);
        Map<String, Object> headCount = tSSsVehicleModelService.mapInfoNew(params);
        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", headCount);
    }

    //厦工替换卡特服务商临时修改
    private void changeSid(Map<String, Object> params, HttpServletRequest request) throws MyException {
        if (getCurrentUser(request).getS_id().equals("b2ee155eed7845809b24e84e54f35060")) {
            params.put("s_id", "6bd970ddd3e44e0f8646f951453ce18e");
        }
    }

    /**
     * 查询车主名下的车辆的使用小时数排名-add at 2022年3月17日14:42:08(main for zt)
     */
//    @PostMapping("/tSSsCarOwnerRang")
//    public ResponseBean tSSsCarOwnerRang(@RequestBody Map<String, Object> paramsMap, HttpServletRequest request) throws MyException {
//        paramsMap.put("s_id", this.getCurrentUser(request).getS_id());
//        paramsMap.put("current_logined_user_id", this.getCurrentUser(request).getId());
//        paramsMap.put("current_logined_user_r_id", this.getCurrentUser(request).getR_id());
//        PageInfo pageInfo = tSSsVehicleModelService.tSSsCarOwnerRang(paramsMap);
//        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", pageInfo);
//    }

    /**
     * 新 查询车主名下的车辆的使用小时数排名
     */
    @PostMapping("/tSSsCarOwnerRang")
    public ResponseBean tSSsCarOwnerRang2(@RequestBody Map<String, Object> paramsMap, HttpServletRequest request) throws MyException {
        paramsMap.put("s_id", this.getCurrentUser(request).getS_id());
        paramsMap.put("current_logined_user_id", this.getCurrentUser(request).getId());
        paramsMap.put("current_logined_user_r_id", this.getCurrentUser(request).getR_id());
        PageInfo pageInfo = tSSsVehicleModelService.tSSsCarOwnerRang2(paramsMap);
        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", pageInfo);
    }

    /**
     * 查询车辆的使用小时数排名-add at 2022年3月17日22:05:36(main for zt)
     */
    @PostMapping("/tSSsCarRang")
    public ResponseBean tSSsCarRang(@RequestBody Map<String, Object> paramsMap, HttpServletRequest request) throws MyException {
        paramsMap.put("s_id", this.getCurrentUser(request).getS_id());
        List<Map<String, Object>> list = tSSsVehicleModelService.tSSsCarRang(paramsMap);
        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", list);
    }

    /**
     * 导出车主（车主名下车辆的使用小时数)排名的数据
     */
    @GetMapping("/exportTSSsCarOwnerRangData")
    public void exportTSSsCarOwnerRangData(@RequestParam Map<String, Object> paramsMap, HttpServletRequest request, HttpServletResponse response) throws Exception {
        List<CarOwnerRangDataBean> list = tSSsVehicleModelService.exportTSSsCarOwnerRangData(paramsMap);
        ExcelUtils.exportExcelToTarget(response, "车主排名", list, CarOwnerRangDataBean.class);
    }

    /**
     * 查询有账期的车辆的车主的开机率排名-add at 2022年3月22日08:44:29(main for zt)
     */
    @PostMapping("/tSSsCarOwnerForWorkPerRang")
    public ResponseBean tSSsCarWorkPerRang(@RequestBody Map<String, Object> paramsMap, HttpServletRequest request) throws MyException, ParseException {
        paramsMap.put("s_id", this.getCurrentUser(request).getS_id());
        paramsMap.put("current_logined_user_id", this.getCurrentUser(request).getId());
        paramsMap.put("current_logined_user_r_id", this.getCurrentUser(request).getR_id());
        PageInfo pageInfo = tSSsVehicleModelService.tSSsCarOwnerForWorkPerRang(paramsMap);
        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", pageInfo);
    }

    /**
     * 查询有账期的某车主下车辆的开机率排名-add at 2022年3月22日09:39:34(main for zt)
     */
    @PostMapping("/tSSsCarRangForWorkPerRang")
    public ResponseBean tSSsCarRangForWorkPerRang(@RequestBody Map<String, Object> paramsMap, HttpServletRequest request) throws MyException, ParseException {
        paramsMap.put("s_id", this.getCurrentUser(request).getS_id());
        List<Map<String, Object>> list = tSSsVehicleModelService.tSSsCarRangForWorkPerRang(paramsMap);
        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", list);
    }

    /**
     * 工时统计-24H-图表-2022年4月6日09:43:12
     */
    @PostMapping("/carOwnerEngineTotalHours")
    public ResponseBean carOwnerEngineTotalHours(@RequestBody Map<String, Object> paramsMap, HttpServletRequest request) throws MyException, ParseException {
        paramsMap.put("s_id", this.getCurrentUser(request).getS_id());
        HashMap<String, Object> map = new HashMap<>();
        PageInfo pageInfo = tSSsVehicleModelService.carOwnerEngineTotalHours(paramsMap);
        //查询时间段内的所有车辆的总工时
        String totalWorkHours = tSSsVehicleModelService.carOwnerEngineGetTotalHoursOf24H(paramsMap);
        map.put("pageInfo", pageInfo);
        map.put("totalWorkHours", totalWorkHours);
        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", map);
    }

    /**
     * 导出工时统计-24H-列表数据-2022年5月6日16:50:12
     */
    @GetMapping("/exportCarOwnerEngineTotalHours")
    public void exportCarOwnerEngineTotalHours(@RequestParam Map<String, Object> paramsMap, HttpServletRequest request, HttpServletResponse response) throws Exception {
        List<CarOwnerEngineTotalHoursDataBean> list = tSSsVehicleModelService.exportCarOwnerEngineTotalHours(paramsMap);
        ExcelUtils.exportExcelToTarget(response, "工时24H统计", list, CarOwnerEngineTotalHoursDataBean.class);
    }

    /**
     * 工时统计-按日统计-图表-2022年4月9日14:36:33
     */
    @PostMapping("/carOwnerEngineTotalHoursOfDay")
    public ResponseBean carOwnerEngineTotalHoursOfDay(@RequestBody Map<String, Object> paramsMap, HttpServletRequest request) throws MyException, ParseException {
        paramsMap.put("s_id", this.getCurrentUser(request).getS_id());
        HashMap<String, Object> map = new HashMap<>();
        PageInfo pageInfo = tSSsVehicleModelService.carOwnerEngineTotalHoursOfDay(paramsMap);
        //查询时间段内的所有车辆的总工时
        String totalWorkHours = tSSsVehicleModelService.carOwnerEngineGetTotalHours(paramsMap);
        map.put("pageInfo", pageInfo);
        map.put("totalWorkHours", totalWorkHours);
        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", map);
    }

    /**
     *  工时统计-按开始结束日期统计-图表
     */
    @PostMapping("/carOwnerEngineTotalHoursBetweenDay")
    public ResponseBean carOwnerEngineTotalHoursBetweenDay(@RequestBody Map<String, Object> paramsMap, HttpServletRequest request) throws MyException, ParseException {
        paramsMap.put("s_id", this.getCurrentUser(request).getS_id());
        HashMap<String, Object> map = new HashMap<>();
        PageInfo pageInfo = tSSsVehicleModelService.carOwnerEngineTotalHoursBetweenDay(paramsMap);

        // 查询时间段内的所有车辆的总工时
        String totalWorkHours = tSSsVehicleModelService.carOwnerEngineGetTotalHoursNew(paramsMap);

        // 查询时间段内的所有车辆的开机总天数
        String totalWorkDays = tSSsVehicleModelService.carOwnerEngineGetTotalDays(paramsMap);

        map.put("pageInfo", pageInfo);
        map.put("totalWorkHours", totalWorkHours);
        map.put("totalWorkDays", totalWorkDays);
        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", map);
    }

    /**
     * 导出工时统计-按开始结束日期统计
     */
    @GetMapping("/exportCarOwnerEngineTotalHoursNew")
    public void exportCarOwnerEngineTotalHoursNew(@RequestParam Map<String, Object> paramsMap, HttpServletRequest request, HttpServletResponse response) throws Exception {
        List<CarOwnerEngineTotalHoursDataBeanNew> list = tSSsVehicleModelService.exportCarOwnerEngineTotalHoursNew(paramsMap);
        ExcelUtils.exportExcelToTarget(response, "工时统计", list, CarOwnerEngineTotalHoursDataBeanNew.class);
    }

    /**
     *  工时统计-车主姓名列表
     */
    @PostMapping("/usernameList")
    public ResponseBean usernameList(@RequestBody Map<String, Object> paramsMap, HttpServletRequest request) throws MyException, ParseException {
        paramsMap.put("s_id", this.getCurrentUser(request).getS_id());
        HashMap<String, Object> map = new HashMap<>();
        List<Map<String, Object>> pageInfo = tSSsVehicleModelService.usernameList(paramsMap);

        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", pageInfo);
    }

    /**
     *  工时统计-车设备列表
     */
    @PostMapping("/bdCarList")
    public ResponseBean bdCarList(@RequestBody Map<String, Object> paramsMap, HttpServletRequest request) throws MyException, ParseException {
        paramsMap.put("s_id", this.getCurrentUser(request).getS_id());
        HashMap<String, Object> map = new HashMap<>();
        List<Map<String, Object>> pageInfo = tSSsVehicleModelService.bdCarList(paramsMap);

        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", pageInfo);
    }



    /**
     * 工时统计-按日统计-列表导出-2022年5月10日11:23:33
     */
    @GetMapping("/exportCarOwnerEngineTotalHoursOfDay")
    public void exportCarOwnerEngineTotalHoursOfDay(@RequestParam Map<String, Object> paramsMap, HttpServletRequest request, HttpServletResponse response) throws Exception {
        //动态字段定义实体类
        List<DynamicColumBean> dynamicColumBeanList = tSSsVehicleModelService.getDynamicColumBean(paramsMap);
        List<ExcelExportEntity> beanList = new ArrayList(dynamicColumBeanList.size());
        for (DynamicColumBean tablePo : dynamicColumBeanList){
            ExcelExportEntity entity = new ExcelExportEntity();
            entity.setName(tablePo.getFiledShowName());
            entity.setKey(tablePo.getFiledCode());
            entity.setOrderNum(tablePo.getOrderNum());
            entity.setWrap(true);
            entity.setWidth(18.0D);
            entity.setHeight(12.0D);
//            if (tablePo.getDataType() == 1){//TODO 这块控制一下，是不是要写成数值型，默认
//                entity.setType(BaseEntityTypeConstants.DOUBLE_TYPE);
//            }
            beanList.add(entity);
        }

        List<Map<String, Object>> list = tSSsVehicleModelService.exportCarOwnerEngineTotalHoursOfDay(paramsMap);
        Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), beanList,
                list);
        response.setCharacterEncoding("UTF-8");
        response.setHeader("content-Type", "application/vnd.ms-excel");
        response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("工时按日统计", "UTF-8") + ".xls");
        ServletOutputStream out = response.getOutputStream();
        workbook.write(out);
        out.flush();

        FileOutputStream fos = new FileOutputStream("D://ExcelExportForMap.tt.xls");
        workbook.write(fos);
        fos.close();
    }

    /**
     * 工时统计-按周统计-图表-2022年4月12日9:56:33
     */
    @PostMapping("/carOwnerEngineTotalHoursOfWeek")
    public ResponseBean carOwnerEngineTotalHoursOfWeek(@RequestBody Map<String, Object> paramsMap, HttpServletRequest request) throws MyException, ParseException {
        paramsMap.put("s_id", this.getCurrentUser(request).getS_id());
        HashMap<String, Object> map = new HashMap<>();
        PageInfo pageInfo = tSSsVehicleModelService.carOwnerEngineTotalHoursOfWeek(paramsMap);

        //查询时间段内的所有车辆的总工时
        String totalWorkHours = tSSsVehicleModelService.carOwnerEngineGetTotalHours(paramsMap);
        map.put("pageInfo", pageInfo);
        map.put("totalWorkHours", totalWorkHours);
        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", map);
    }

    /**
     * 工时统计-按日统计-列表导出-2022年5月10日11:23:33
     */
    @GetMapping("/exportCarOwnerEngineTotalHoursOfWeek")
    public void exportCarOwnerEngineTotalHoursOfWeek(@RequestParam Map<String, Object> paramsMap, HttpServletRequest request, HttpServletResponse response) throws Exception {
        //动态字段定义实体类
        List<DynamicColumBean> dynamicColumBeanList = tSSsVehicleModelService.getDynamicColumOfWeekBean(paramsMap);
        List<ExcelExportEntity> beanList = new ArrayList(dynamicColumBeanList.size());
        for (DynamicColumBean tablePo : dynamicColumBeanList){
            ExcelExportEntity entity = new ExcelExportEntity();
            entity.setName(tablePo.getFiledShowName());
            entity.setKey(tablePo.getFiledCode());
            entity.setOrderNum(tablePo.getOrderNum());
            entity.setWrap(true);
            entity.setWidth(18.0D);
            entity.setHeight(12.0D);

            beanList.add(entity);
        }

        List<Map<String, Object>> list = tSSsVehicleModelService.exportCarOwnerEngineTotalHoursOfWeek(paramsMap);
        Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), beanList,
                list);
        response.setCharacterEncoding("UTF-8");
        response.setHeader("content-Type", "application/vnd.ms-excel");
        response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("工时按周统计", "UTF-8") + ".xls");
        ServletOutputStream out = response.getOutputStream();
        workbook.write(out);
        out.flush();

        FileOutputStream fos = new FileOutputStream("D://ExcelExportForMap.tt.xls");
        workbook.write(fos);
        fos.close();
    }

    /**
     * 工时统计-按月统计-图表-2022年4月12日9:56:33
     */
    @PostMapping("/carOwnerEngineTotalHoursOfMonth")
    public ResponseBean carOwnerEngineTotalHoursOfMonth(@RequestBody Map<String, Object> paramsMap, HttpServletRequest request) throws MyException, ParseException {
        paramsMap.put("s_id", this.getCurrentUser(request).getS_id());
        HashMap<String, Object> map = new HashMap<>();
        PageInfo pageInfo = tSSsVehicleModelService.carOwnerEngineTotalHoursOfMonth(paramsMap);

        //查询时间段内的所有车辆的总工时
        String totalWorkHours = tSSsVehicleModelService.carOwnerEngineGetTotalHours(paramsMap);
        map.put("pageInfo", pageInfo);
        map.put("totalWorkHours", totalWorkHours);
        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", map);
    }

    /**
     * 工时统计-按月统计-列表导出-2022年5月10日11:23:33
     */
    @GetMapping("/exportCarOwnerEngineTotalHoursOfMonth")
    public void exportCarOwnerEngineTotalHoursOfMonth(@RequestParam Map<String, Object> paramsMap, HttpServletRequest request, HttpServletResponse response) throws Exception {
        //动态字段定义实体类
        List<DynamicColumBean> dynamicColumBeanList = tSSsVehicleModelService.getDynamicColumOfMonthBean(paramsMap);
        List<ExcelExportEntity> beanList = new ArrayList(dynamicColumBeanList.size());
        for (DynamicColumBean tablePo : dynamicColumBeanList){
            ExcelExportEntity entity = new ExcelExportEntity();
            entity.setName(tablePo.getFiledShowName());
            entity.setKey(tablePo.getFiledCode());
            entity.setOrderNum(tablePo.getOrderNum());
            entity.setWrap(true);
            entity.setWidth(18.0D);
            entity.setHeight(12.0D);

            beanList.add(entity);
        }

        List<Map<String, Object>> list = tSSsVehicleModelService.exportCarOwnerEngineTotalHoursOfMonth(paramsMap);
        Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), beanList,
                list);
        response.setCharacterEncoding("UTF-8");
        response.setHeader("content-Type", "application/vnd.ms-excel");
        response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("工时按月统计", "UTF-8") + ".xls");
        ServletOutputStream out = response.getOutputStream();
        workbook.write(out);
        out.flush();

//        FileOutputStream fos = new FileOutputStream("D://ExcelExportForMap.tt.xls");
//        workbook.write(fos);
//        fos.close();
    }

    /**
     * 油耗报表-加油统计-按日-2022年4月19日10:05:33
     */
    @PostMapping("/carOwnerEngineTotalFuelConsumptionOfDay")
    public ResponseBean carOwnerEngineTotalFuelConsumptionOfDay(@RequestBody Map<String, Object> paramsMap, HttpServletRequest request) throws MyException, ParseException {
        paramsMap.put("s_id", this.getCurrentUser(request).getS_id());
        HashMap<String, Object> map = new HashMap<>();
        PageInfo pageInfo = tSSsVehicleModelService.carOwnerEngineTotalFuelConsumptionOfDay(paramsMap);

        //查询一段时间的所有车辆的加油量 (yyyy-mm-dd->yyyy-mm-dd)
        String totalFuelConsumption = tSSsVehicleModelService.carOwnerEngineGetTotalFuelConsumption(paramsMap);
        map.put("pageInfo", pageInfo);
        map.put("totalFuelConsumption", totalFuelConsumption);
        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", map);
    }

    /**
     * 油耗报表-加油统计-按日-列表导出-2022年5月11日09:23:33
     */
    @GetMapping("/exportCarOwnerEngineTotalFuelConsumptionOfDay")
    public void exportCarOwnerEngineTotalFuelConsumptionOfDay(@RequestParam Map<String, Object> paramsMap, HttpServletRequest request, HttpServletResponse response) throws Exception {
        //动态字段定义实体类
        List<DynamicColumBean> dynamicColumBeanList = tSSsVehicleModelService.getDynamicColumOfFuelDayBean(paramsMap);
        List<ExcelExportEntity> beanList = new ArrayList(dynamicColumBeanList.size());
        for (DynamicColumBean tablePo : dynamicColumBeanList){
            ExcelExportEntity entity = new ExcelExportEntity();
            entity.setName(tablePo.getFiledShowName());
            entity.setKey(tablePo.getFiledCode());
            entity.setOrderNum(tablePo.getOrderNum());
            entity.setWidth(15.0D);

            beanList.add(entity);
        }

        List<Map<String, Object>> list = tSSsVehicleModelService.exportCarOwnerEngineTotalFuelConsumptionOfDay(paramsMap);
        Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), beanList,
                list);
        response.setCharacterEncoding("UTF-8");
        response.setHeader("content-Type", "application/vnd.ms-excel");
        response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("加油按日统计", "UTF-8") + ".xls");
        ServletOutputStream out = response.getOutputStream();
        workbook.write(out);
        out.flush();

        FileOutputStream fos = new FileOutputStream("D://ExcelExportForMap.tt.xls");
        workbook.write(fos);
        fos.close();
    }

    /**
     * 油耗报表-加油统计-按周-2022年4月19日10:05:33
     */
    @PostMapping("/carOwnerEngineTotalFuelConsumptionOfWeek")
    public ResponseBean carOwnerEngineTotalFuelConsumptionOfWeek(@RequestBody Map<String, Object> paramsMap, HttpServletRequest request) throws MyException, ParseException {
        paramsMap.put("s_id", this.getCurrentUser(request).getS_id());
        HashMap<String, Object> map = new HashMap<>();
        PageInfo pageInfo = tSSsVehicleModelService.carOwnerEngineTotalFuelConsumptionOfWeek(paramsMap);

        //查询一段时间的所有车辆的加油量 (yyyy-mm-dd->yyyy-mm-dd)
        String totalFuelConsumption = tSSsVehicleModelService.carOwnerEngineGetTotalFuelConsumption(paramsMap);
        map.put("pageInfo", pageInfo);
        map.put("totalFuelConsumption", totalFuelConsumption);
        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", map);
    }

    /**
     * 油耗报表-加油统计-按周统计-列表导出-2022年5月10日11:23:33
     */
    @GetMapping("/exportCarOwnerEngineTotalFuelConsumptionOfWeek")
    public void exportCarOwnerEngineTotalFuelConsumptionOfWeek(@RequestParam Map<String, Object> paramsMap, HttpServletRequest request, HttpServletResponse response) throws Exception {
        //动态字段定义实体类
        List<DynamicColumBean> dynamicColumBeanList = tSSsVehicleModelService.getDynamicColumOfFuelWeekBean(paramsMap);
        List<ExcelExportEntity> beanList = new ArrayList(dynamicColumBeanList.size());
        for (DynamicColumBean tablePo : dynamicColumBeanList){
            ExcelExportEntity entity = new ExcelExportEntity();
            entity.setName(tablePo.getFiledShowName());
            entity.setKey(tablePo.getFiledCode());
            entity.setOrderNum(tablePo.getOrderNum());
            entity.setWidth(15.0D);

            beanList.add(entity);
        }

        List<Map<String, Object>> list = tSSsVehicleModelService.exportCarOwnerEngineTotalFuelConsumptionOfWeek(paramsMap);
        Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), beanList,
                list);
        response.setCharacterEncoding("UTF-8");
        response.setHeader("content-Type", "application/vnd.ms-excel");
        response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("加油按周统计", "UTF-8") + ".xls");
        ServletOutputStream out = response.getOutputStream();
        workbook.write(out);
        out.flush();

        FileOutputStream fos = new FileOutputStream("D://ExcelExportForMap.tt.xls");
        workbook.write(fos);
        fos.close();
    }

    /**
     * 油耗报表-加油统计-按月-2022年4月19日10:05:33
     */
    @PostMapping("/carOwnerEngineTotalFuelConsumptionOfMonth")
    public ResponseBean carOwnerEngineTotalFuelConsumptionOfMonth(@RequestBody Map<String, Object> paramsMap, HttpServletRequest request) throws MyException, ParseException {
        paramsMap.put("s_id", this.getCurrentUser(request).getS_id());
        HashMap<String, Object> map = new HashMap<>();
        PageInfo pageInfo = tSSsVehicleModelService.carOwnerEngineTotalFuelConsumptionOfMonth(paramsMap);

        //查询一段时间的所有车辆的加油量 (yyyy-mm-dd->yyyy-mm-dd)
        String totalFuelConsumption = tSSsVehicleModelService.carOwnerEngineGetTotalFuelConsumption(paramsMap);
        map.put("pageInfo", pageInfo);
        map.put("totalFuelConsumption", totalFuelConsumption);
        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", map);
    }

    /**
     * 油耗报表-加油统计-按周统计-列表导出-2022年5月10日11:23:33
     */
    @GetMapping("/exportCarOwnerEngineTotalFuelConsumptionOfMonth")
    public void exportCarOwnerEngineTotalFuelConsumptionOfMonth(@RequestParam Map<String, Object> paramsMap, HttpServletRequest request, HttpServletResponse response) throws Exception {
        //动态字段定义实体类
        List<DynamicColumBean> dynamicColumBeanList = tSSsVehicleModelService.getDynamicColumOfFuelMonthBean(paramsMap);
        List<ExcelExportEntity> beanList = new ArrayList(dynamicColumBeanList.size());
        for (DynamicColumBean tablePo : dynamicColumBeanList){
            ExcelExportEntity entity = new ExcelExportEntity();
            entity.setName(tablePo.getFiledShowName());
            entity.setKey(tablePo.getFiledCode());
            entity.setOrderNum(tablePo.getOrderNum());
            entity.setWidth(15.0D);

            beanList.add(entity);
        }

        List<Map<String, Object>> list = tSSsVehicleModelService.exportCarOwnerEngineTotalFuelConsumptionOfMonth(paramsMap);
        Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), beanList,
                list);
        response.setCharacterEncoding("UTF-8");
        response.setHeader("content-Type", "application/vnd.ms-excel");
        response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("加油按月统计", "UTF-8") + ".xls");
        ServletOutputStream out = response.getOutputStream();
        workbook.write(out);
        out.flush();

        FileOutputStream fos = new FileOutputStream("D://ExcelExportForMap.tt.xls");
        workbook.write(fos);
        fos.close();
    }

    @PostMapping("/carOwnerEngineFuelConsumptionAnalysisOfDay")
    public ResponseBean carOwnerEngineFuelConsumptionAnalysisOfDay(@RequestBody Map<String, Object> paramsMap, HttpServletRequest request) throws MyException, ParseException {
        paramsMap.put("s_id", this.getCurrentUser(request).getS_id());
        HashMap<String, Object> map = new HashMap<>();
        PageInfo pageInfo = tSSsVehicleModelService.carOwnerEngineFuelConsumptionAnalysisOfDay(paramsMap);

        //查询一段时间的所有车辆的加油量 (yyyy-mm-dd->yyyy-mm-dd)
        String totalFuelConsumption = tSSsVehicleModelService.carOwnerEngineGetTotalFuelConsumption(paramsMap);
        map.put("pageInfo", pageInfo);
        map.put("totalFuelConsumption", totalFuelConsumption);
        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", map);
    }

    //  油耗-按开始日期和结束日期统计
    @PostMapping("/carOwnerEngineFuelConsumptionAnalysisBetweenDay")
    public ResponseBean carOwnerEngineFuelConsumptionAnalysisBetweenDay(@RequestBody Map<String, Object> paramsMap, HttpServletRequest request) throws MyException, ParseException {
        paramsMap.put("s_id", this.getCurrentUser(request).getS_id());
        HashMap<String, Object> map = new HashMap<>();
        PageInfo pageInfo = tSSsVehicleModelService.carOwnerEngineFuelConsumptionAnalysisBetweenDay(paramsMap);

        //  查询一段时间的所有车辆的加油量 (yyyy-mm-dd->yyyy-mm-dd) 这里的查询应该是匹配条件后的
        String totalFuelConsumption = tSSsVehicleModelService.carOwnerEngineGetTotalFuelConsumptionNew(paramsMap);
        double totalAverageFuelConsumption1 = tSSsVehicleModelService.carOwnerEngineFuelConsumptionAnalysisBetweenDaysum(paramsMap);
        String formattedValue = String.format("%.2f",totalAverageFuelConsumption1);
        double totalAverageFuelConsumption = Double.parseDouble(formattedValue);
        map.put("pageInfo", pageInfo);
        map.put("totalFuelConsumption", totalFuelConsumption);
        map.put("totalAverageFuelConsumption",totalAverageFuelConsumption);
        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", map);
    }

    /**
     * 油耗报表-加油统计-按周统计-列表导出-2022年5月10日11:23:33
     */
    @GetMapping("/exportCarOwnerEngineFuelConsumptionAnalysisOfDay")
    public void exportCarOwnerEngineFuelConsumptionAnalysisOfDay(@RequestParam Map<String, Object> paramsMap, HttpServletRequest request, HttpServletResponse response) throws Exception {
        //动态字段定义实体类
        List<DynamicColumBean> dynamicColumBeanList = tSSsVehicleModelService.getDynamicColumOfFuelAnalysisDayBean(paramsMap);
        List<ExcelExportEntity> beanList = new ArrayList(dynamicColumBeanList.size());
        for (DynamicColumBean tablePo : dynamicColumBeanList){
            ExcelExportEntity entity = new ExcelExportEntity();
            entity.setName(tablePo.getFiledShowName());
            entity.setKey(tablePo.getFiledCode());
            entity.setOrderNum(tablePo.getOrderNum());
            entity.setWrap(true);
            entity.setWidth(22.0D);
            entity.setHeight(18.0D);

            beanList.add(entity);
        }

        List<Map<String, Object>> list = tSSsVehicleModelService.exportCarOwnerEngineFuelConsumptionAnalysisOfDay(paramsMap);
        Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), beanList,
                list);
        response.setCharacterEncoding("UTF-8");
        response.setHeader("content-Type", "application/vnd.ms-excel");
        response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("油耗分析按日", "UTF-8") + ".xls");
        ServletOutputStream out = response.getOutputStream();
        workbook.write(out);
        out.flush();

        FileOutputStream fos = new FileOutputStream("D://ExcelExportForMap.tt.xls");
        workbook.write(fos);
        fos.close();
    }

    /**
     * 油耗报表-加油统计-按周统计-列表导出-2022年5月10日11:23:33
     */
    @GetMapping("/exportCarOwnerEngineFuelConsumptionAnalysisBetweenDay")
    public void exportCarOwnerEngineFuelConsumptionAnalysisBetweenDay(@RequestParam Map<String, Object> paramsMap, HttpServletRequest request, HttpServletResponse response) throws Exception {
        //动态字段定义实体类
//        List<DynamicColumBean> dynamicColumBeanList = tSSsVehicleModelService.getDynamicColumOfFuelAnalysisDayBean(paramsMap);
        // 获取头名称
        List<DynamicColumBean> dynamicColumBeanList = tSSsVehicleModelService.getColumOfFuelAnalysisDayBean(paramsMap);
        List<ExcelExportEntity> beanList = new ArrayList(dynamicColumBeanList.size());
        for (DynamicColumBean tablePo : dynamicColumBeanList){
            ExcelExportEntity entity = new ExcelExportEntity();
            entity.setName(tablePo.getFiledShowName());
            entity.setKey(tablePo.getFiledCode());
            entity.setOrderNum(tablePo.getOrderNum());
            entity.setWrap(true);
            entity.setWidth(22.0D);
            entity.setHeight(18.0D);

            beanList.add(entity);
        }

//        List<Map<String, Object>> list = tSSsVehicleModelService.exportCarOwnerEngineFuelConsumptionAnalysisOfDay(paramsMap);
        //  获取对应的导出数据,这里为啥没有数据
        List<Map<String, Object>> list = tSSsVehicleModelService.exportCarOwnerEngineFuelConsumptionAnalysisBetweenDay(paramsMap);
//        List<CarOwnerEngineFuelConsumptionDataBean> list = tSSsVehicleModelService.exportCarOwnerEngineFuelConsumptionAnalysisNew(paramsMap);
        // 这里的导出有毛病
//        ExcelUtils.exportExcelToTarget(response, "aaa工时24H统计", list, CarOwnerEngineTotalHoursDataBean.class);
        Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), beanList,
                list);
        response.setCharacterEncoding("UTF-8");
        response.setHeader("content-Type", "application/vnd.ms-excel");
        response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("油耗分析", "UTF-8") + ".xls");
        ServletOutputStream out = response.getOutputStream();
        workbook.write(out);
        out.flush();

        FileOutputStream fos = new FileOutputStream("D://ExcelExportForMap.tt.xls");
        workbook.write(fos);
        fos.close();
    }

    @PostMapping("/carOwnerEngineFuelConsumptionAnalysisOfWeek")
    public ResponseBean carOwnerEngineFuelConsumptionAnalysisOfWeek(@RequestBody Map<String, Object> paramsMap, HttpServletRequest request) throws MyException, ParseException {
        paramsMap.put("s_id", this.getCurrentUser(request).getS_id());
        HashMap<String, Object> map = new HashMap<>();
        PageInfo pageInfo = tSSsVehicleModelService.carOwnerEngineFuelConsumptionAnalysisOfWeek(paramsMap);

        //查询一段时间的所有车辆的加油量 (yyyy-mm-dd->yyyy-mm-dd)
        String totalFuelConsumption = tSSsVehicleModelService.carOwnerEngineGetTotalFuelConsumption(paramsMap);
        map.put("pageInfo", pageInfo);
        map.put("totalFuelConsumption", totalFuelConsumption);
        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", map);
    }

    /**
     * 油耗报表-加油统计-按周统计-列表导出-2022年5月11日16:23:33
     */
    @GetMapping("/exportCarOwnerEngineFuelConsumptionAnalysisOfWeek")
    public void exportCarOwnerEngineFuelConsumptionAnalysisOfWeek(@RequestParam Map<String, Object> paramsMap, HttpServletRequest request, HttpServletResponse response) throws Exception {
        //动态字段定义实体类
        List<DynamicColumBean> dynamicColumBeanList = tSSsVehicleModelService.getDynamicColumOfFuelAnalysisWeekBean(paramsMap);
        List<ExcelExportEntity> beanList = new ArrayList(dynamicColumBeanList.size());
        for (DynamicColumBean tablePo : dynamicColumBeanList){
            ExcelExportEntity entity = new ExcelExportEntity();
            entity.setName(tablePo.getFiledShowName());
            entity.setKey(tablePo.getFiledCode());
            entity.setOrderNum(tablePo.getOrderNum());
            entity.setWrap(true);
            entity.setWidth(22.0D);
            entity.setHeight(18.0D);

            beanList.add(entity);
        }

        List<Map<String, Object>> list = tSSsVehicleModelService.exportCarOwnerEngineFuelConsumptionAnalysisOfWeek(paramsMap);
        Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), beanList,
                list);
        response.setCharacterEncoding("UTF-8");
        response.setHeader("content-Type", "application/vnd.ms-excel");
        response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("油耗分析按周", "UTF-8") + ".xls");
        ServletOutputStream out = response.getOutputStream();
        workbook.write(out);
        out.flush();

        FileOutputStream fos = new FileOutputStream("D://ExcelExportForMap.tt.xls");
        workbook.write(fos);
        fos.close();
    }

    @PostMapping("/carOwnerEngineFuelConsumptionAnalysisOfMonth")
    public ResponseBean carOwnerEngineFuelConsumptionAnalysisOfMonth(@RequestBody Map<String, Object> paramsMap, HttpServletRequest request) throws MyException, ParseException {
        paramsMap.put("s_id", this.getCurrentUser(request).getS_id());
        HashMap<String, Object> map = new HashMap<>();
        PageInfo pageInfo = tSSsVehicleModelService.carOwnerEngineFuelConsumptionAnalysisOfMonth(paramsMap);

        //查询一段时间的所有车辆的加油量 (yyyy-mm-dd->yyyy-mm-dd)
        String totalFuelConsumption = tSSsVehicleModelService.carOwnerEngineGetTotalFuelConsumption(paramsMap);
        map.put("pageInfo", pageInfo);
        map.put("totalFuelConsumption", totalFuelConsumption);
        return new ResponseBean(Constants.CODE_SUCCESS, "操作成功", map);
    }

    /**
     * 油耗报表-加油统计-按周统计-列表导出-2022年5月11日16:23:33
     */
    @GetMapping("/exportCarOwnerEngineFuelConsumptionAnalysisOfMonth")
    public void exportCarOwnerEngineFuelConsumptionAnalysisOfMonth(@RequestParam Map<String, Object> paramsMap, HttpServletRequest request, HttpServletResponse response) throws Exception {
        //动态字段定义实体类
        List<DynamicColumBean> dynamicColumBeanList = tSSsVehicleModelService.getDynamicColumOfFuelAnalysisMonthBean(paramsMap);
        List<ExcelExportEntity> beanList = new ArrayList(dynamicColumBeanList.size());
        for (DynamicColumBean tablePo : dynamicColumBeanList){
            ExcelExportEntity entity = new ExcelExportEntity();
            entity.setName(tablePo.getFiledShowName());
            entity.setKey(tablePo.getFiledCode());
            entity.setOrderNum(tablePo.getOrderNum());
            entity.setWrap(true);
            entity.setWidth(22.0D);
            entity.setHeight(18.0D);

            beanList.add(entity);
        }

        List<Map<String, Object>> list = tSSsVehicleModelService.exportCarOwnerEngineFuelConsumptionAnalysisOfMonth(paramsMap);
        Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), beanList,
                list);
        response.setCharacterEncoding("UTF-8");
        response.setHeader("content-Type", "application/vnd.ms-excel");
        response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("油耗分析按月", "UTF-8") + ".xls");
        ServletOutputStream out = response.getOutputStream();
        workbook.write(out);
        out.flush();

        FileOutputStream fos = new FileOutputStream("D://ExcelExportForMap.tt.xls");
        workbook.write(fos);
        fos.close();
    }

    /**
     * 设备日报
     */
    @PostMapping("/equipmentReportByDay")
    public ResponseBean equipmentReportByDay(@RequestBody Map<String, Object> paramsMap,HttpServletRequest request) throws MyException{
        String sId = getCurrentUser(request).getS_id();
        paramsMap.put("s_id", sId);
        PageInfo pageInfo = tSSsVehicleModelService.equipmentReportByDay(paramsMap);
        return new ResponseBean(Constants.CODE_SUCCESS,"操作成功！",pageInfo);
    }

    /**
     * 设备日报-详情-油量统计
     */
    @PostMapping("/equipmentFuelGaugeStatisticsByDay")
    public ResponseBean equipmentFuelGaugeStatisticsByDay(@RequestBody Map<String, Object> paramsMap,HttpServletRequest request) throws MyException{

        return new ResponseBean(Constants.CODE_SUCCESS,"操作成功！",null);
    }

}